<?php
ini_set ( 'session.use_cookies', 1 );
ini_set ( 'session.use_only_cookies', 1 );
session_start ();
?>

<script type="text/javascript">
		window.addEvent('domready',function (){
				$$('.ok').addEvent('click',function (){
					var password=document.getElementById('pa');
					var diachi=document.getElementById('di');
					var sodientthoai=document.getElementById('dt');
					var email=document.getElementById('em');
					var cmnd=document.getElementById('cm');
					var hoten=document.getElementById('ho');

					
					var log=$('log');
					
					
					var myRequest = new Request({   
						
						url: rootURL+'/tai-khoan/updatesuccess', 
						  method: 'post',  
						  data:{password: password.value,
									diachi: diachi.value,
										sodienthoai: sodientthoai.value,
											email: email.value,
												cmnd: cmnd.value,
													hoten: hoten.value
													},
							
							   onSuccess: function(responseText, responseXML) {
									alert(responseText);
					       			var trove=document.getElementById("can");
					       			trove.value="Trở Lại";
									this.dispose();
					        		} 
				       						})				       						;
				       			 myRequest.send();
					       			
						});
								
				

				});
</script>




<div class="center_title_bar">Thay Đổi Thông Tin</div>
<div class="prod_box_big">
<div class="top_prod_box_big"></div>
<div class="center_prod_box_big">
<div id="log">
<form method="post">
<center>


  	<?php
			$taikhoan = $this->taikhoan;
			$taikhoan instanceof Application_Model_bean_TaiKhoan;
			$id = $_SESSION ['id'];
			if ($id != NULL) {
				
				?>  
	
	<table width="396" border="0" align="center">

	<tr>
		<td>Password*</td>
		<td><input id="pa" type="password" name="password"
			value="<?php
				echo $taikhoan->getPassword ()?>" /></td>
	</tr>

	<tr>
		<td>H&#7885; v&agrave; T&ecirc;n *</td>
		<td><input id="ho" type="text" name="hoten"
			value="<?php
				echo $taikhoan->getHoVaTen ()?>" /></td>
	</tr>
	<tr>
		<td>CMND*</td>
		<td><input id="cm" type="text" name="cmnd"
			value="<?php
				echo $taikhoan->getCmnd ()?>" /></td>
	</tr>
	<tr>
		<td>Địa Chỉ</td>
		<td><input id="di" type="text" name="diachi"
			value="<?php
				echo $taikhoan->getDiaChi ()?>" /></td>
	</tr>
	<tr>
		<td>S&#7889; &#272;i&#7879;n Tho&#7841;i</td>
		<td><input id="dt" type="text" name="dienthoai"
			value="<?php
				echo $taikhoan->getSoDienThoai ()?>" /></td>
	</tr>
	<tr>
		<td>Email*</td>
		<td><input id="em" type="text" name="email"
			value="<?php
				echo $taikhoan->getEmail ()?>" /></td>
	</tr>

	<tr>
		<td align="right"><input class="ok" type="button" name="submit"
			value="OK" onclick="return false" /></td>
		<td><input id="can" type="button" name="submit" value="Cancel"
			onclick="window.history.back(1)" /></td>
	</tr>
</table>


		
	<?php
			} else
				echo "<h3> Bạn Cần Đăng Nhập Trước"?>
		
		</center>
</form>
</div>
</div>
<div class="bottom_prod_box_big"></div>
</div>

